import Loading from './loading.vue'
const loading = {
  install (Vue) {
    // 得到组件构造器
    const LoadingClass = Vue.extend(Loading)
    // 得到组件实例
    const loadingvm = new LoadingClass()
    // console.log(loadingvm.$mount().$el)
    document.body.appendChild(loadingvm.$mount().$el)
    Vue.prototype.$showLoading = () => {
      loadingvm.isShow = true
    }
    Vue.prototype.$hideLoading = () => {
      loadingvm.isShow = false
    }
  }
}
export default loading
